package net.zjitc.doubao_community_backed.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import net.zjitc.doubao_community_backed.model.dto.CreateTopicDTO;
import net.zjitc.doubao_community_backed.model.entity.BmsPost;
import net.zjitc.doubao_community_backed.model.entity.UmsUser;
import net.zjitc.doubao_community_backed.model.vo.PostVO;

import java.util.Map;

/**
 * @Author 董熠涛
 * @Date 2025/6/19  21:59
 */
public interface IBmsPostService extends IService<BmsPost> {

    /**
     * 获取首页话题列表
     */
    Page<PostVO> getList(Page<PostVO> page, String tab);
    /**More actions
     * 发布
     *
     * @param dto
     * @param principal
     * @return
     */
    BmsPost create(CreateTopicDTO dto, UmsUser principal);

    /**More actions
     * 查看话题详情
     *
     * @param id
     * @return
     */
    Map<String, Object> viewTopic(String id);
}
